package vn.edu.ptithcm.pim.service;

import java.util.List;

import vn.edu.ptithcm.pim.dao.ResourceDao;
import vn.edu.ptithcm.pim.dom.Resource;

@SuppressWarnings("rawtypes")
public class ResourceService {
	private ResourceDao resourceDao;

	public ResourceDao getResourceDao() {
		return resourceDao;
	}

	public void setResourceDao(ResourceDao resourceDao) {
		this.resourceDao = resourceDao;
	}

	public void save(Resource resources) {
		resourceDao.save(resources);
	}

	public void saveOrUpdate(Resource resources) {
		resourceDao.saveOrUpdate(resources);
	}

	public void lock(Resource resources) {
		resourceDao.lock(resources);
	}

	public void delete(Resource resources) {
		resourceDao.delete(resources);
	}

	public Resource merge(Resource resources) {
		return resourceDao.merge(resources);
	}

	public Resource findById(java.lang.Long id) {
		return resourceDao.findById(id);
	}

	public List findByExample(Resource Resources) {
		return resourceDao.findByExample(Resources);
	}

	public List<Resource> findByTask(Long taskid) {
		return resourceDao.findByTask(taskid);
	}

	public List<Resource> findByProject(Long projectid, Long categoryId) {
		return resourceDao.findByProject(projectid, categoryId);
	}

	public List<Resource> findByProject(Long projectid) {
		return resourceDao.findByProject(projectid);
	}

	public List<Long> getAvailableResourceCategoryIds(Long projectid) {
		return resourceDao.getAvailableResourceCategoryIds(projectid);
	}

	public List getAll() {
		return resourceDao.getAll();
	}

	public List<Resource> getResourcesForSlideShow(int slideShowCount) {
		return resourceDao.getResourcesForSlideShow(slideShowCount);
	}

	public void deleteByProjectId(java.lang.Long id) {
		resourceDao.deleteByProjectId(id);
	}

	public void deleteByTaskId(java.lang.Long id) {
		resourceDao.deleteByTaskId(id);
	}
}
